﻿<navigation:Page x:Class="HelfenHelfen.RIA.Views.DemandDetails" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="DemandDetails Page" xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.DomainServices" xmlns:my="clr-namespace:HelfenHelfen.RIA.Web.Models" xmlns:my1="clr-namespace:HelfenHelfen.RIA.Web.Services" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="179*" />
            <RowDefinition Height="271*" />
            <RowDefinition Height="30" />
        </Grid.RowDefinitions>
        <riaControls:DomainDataSource AutoLoad="True" 
                                      d:DataContext="{d:DesignInstance my:Demand, CreateList=true}" 
                                      Height="0" LoadedData="demandDomainDataSource_LoadedData" 
                                      Name="demandDomainDataSource" QueryName="GetDemandByIDQuery" Width="0" Margin="320,225,320,33">
            <riaControls:DomainDataSource.DomainContext>
                <my1:HelfenHelfenDomainContext />
            </riaControls:DomainDataSource.DomainContext>
        </riaControls:DomainDataSource>
        <Grid DataContext="{Binding ElementName=demandDomainDataSource, Path=Data}" Name="grid1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <sdk:Label Content="City:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="cityTextBox" Text="{Binding Path=City, Mode=TwoWay, NotifyOnValidationError=true, TargetNullValue=''}" VerticalAlignment="Center" Width="300" />
            <sdk:Label Content="Description:" Grid.Column="0" Grid.Row="5" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="5" Height="23" HorizontalAlignment="Left" Margin="3" Name="descriptionTextBox" Text="{Binding Path=Description, Mode=TwoWay, NotifyOnValidationError=true, TargetNullValue=''}" VerticalAlignment="Center" Width="300" />
            <sdk:Label Content="Postal Code:" Grid.Column="0" Grid.Row="8" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="8" Height="23" HorizontalAlignment="Left" Margin="3" Name="postalCodeTextBox" Text="{Binding Path=PostalCode, Mode=TwoWay, NotifyOnValidationError=true, TargetNullValue=''}" VerticalAlignment="Center" Width="300" />
            <sdk:Label Content="Street:" Grid.Column="0" Grid.Row="10" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="10" Height="23" HorizontalAlignment="Left" Margin="3" Name="streetTextBox" Text="{Binding Path=Street, Mode=TwoWay, NotifyOnValidationError=true, TargetNullValue=''}" VerticalAlignment="Center" Width="300" />
            <sdk:Label Content="Title:" Grid.Column="0" Grid.Row="11" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="11" Height="23" HorizontalAlignment="Left" Margin="3" Name="titleTextBox" Text="{Binding Path=Title, Mode=TwoWay, NotifyOnValidationError=true, TargetNullValue=''}" VerticalAlignment="Center" Width="300" />
        </Grid>
        <Button Content="Save ..." Grid.Row="2" Height="23" HorizontalAlignment="Left" Margin="0,7,0,0" 
                Name="btnSave" VerticalAlignment="Top" Width="75" Click="btnSave_Click" />
        <Border Grid.Row="1" HorizontalAlignment="Left" 
                Name="ImageBorder" Background="DarkGreen" Margin="0,0,0,8" AllowDrop="True" Drop="ImageBorder_Drop" Opacity="1">
            <Image Name="WebcamImage" 
                   Stretch="Fill" VerticalAlignment="Top" 
                   Width="240" />
        </Border>
        <Button Content="Preview!" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="249,0,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" />
        <Button Content="Capture!" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="249,32,0,0" Name="button2" VerticalAlignment="Top" Width="75" Click="button2_Click" />
    </Grid>
</navigation:Page>
